// ==========================================================================
// GFast自动生成service操作代码。
// 生成日期：2024-11-11 20:52:34
// 生成路径: internal/app/system/service/users.go
// 生成人：王中阳
// desc:用户
// company:云南奇讯科技有限公司
// ==========================================================================

package service

import (
	"context"

	"github.com/tiger1103/gfast/v3/internal/app/system/model"
)

type IUsers interface {
	List(ctx context.Context, req *model.UsersSearchReq) (res *model.UsersSearchRes, err error)
	GetExportData(ctx context.Context, req *model.UsersSearchReq) (listRes []*model.UsersInfoRes, err error)
	GetById(ctx context.Context, Id int) (res *model.UsersInfoRes, err error)
	Add(ctx context.Context, req *model.UsersAddReq) (err error)
	Edit(ctx context.Context, req *model.UsersEditReq) (err error)
	Delete(ctx context.Context, Id []int) (err error)
	LinkedUsersDataSearch(ctx context.Context) (res *model.LinkedUsersDataSearchRes, err error)
}

var localUsers IUsers

func Users() IUsers {
	if localUsers == nil {
		panic("implement not found for interface IUsers, forgot register?")
	}
	return localUsers
}

func RegisterUsers(i IUsers) {
	localUsers = i
}
